class CountUpTimer < ActiveRecord::Base

  def start(now)
    @start_time = now
    @updated_at
  end
  
  def stop(now)
    @offset += now - start_time;
    start_time = -1;
    @updated_at
  end
  
  def reset(now)
    @start_time = now
    @offset = 0;
    @updated_at
  end
  
  def rename(newname)
    @title = newname;
    @updated_at
  end
  
  def toggle(now)
    isStopped? ? start(now) : stop(now)
  end
  
  def isStopped?
    start_time == -1;
  end
  
end
